import 'package:flutter_massage/common_lib/index.dart';
import 'package:get/get.dart';

class MyLogic extends GetxController {
  static const keyListener = 'key_listener_refresh_my_page';

  @override
  void onReady() {
    super.onReady();
    CommonObservable().addObserver(keyListener, refreshPage);
  }

  @override
  void onClose() {
    super.onClose();
    CommonObservable().removeObserver(keyListener, refreshPage);
  }

  void refreshPage(key, [value]) => update();
}
